-- GENERATED SPELL FOR [Rocklance] --


function spell0_5841(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5841', 582, 1)
end

function spell1_5841(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_5841', 635, 1)
end

function spell2_5841(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5841', 30334, 1)
end

function Sorts_5841(pUnit, Event)
local choix_sorts_5841 = math.random(0, 2)
if choix_sorts_5841 == 0 then
pUnit:RegisterEvent('spell0_5841', 1, 1)
end
if choix_sorts_5841 == 1 then
pUnit:RegisterEvent('spell1_5841', 1, 1)
end
if choix_sorts_5841 == 2 then
pUnit:RegisterEvent('spell2_5841', 1, 1)
end
end

function mob5841_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5841', math.random(1500, 3000), 1)
end

function mob5841_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5841_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5841_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5841, 1, 'mob5841_Action')
RegisterUnitEvent(5841, 2, 'mob5841_Leave')
RegisterUnitEvent(5841, 3, 'mob5841_Kill')
RegisterUnitEvent(5841, 4, 'mob5841_Die')
